﻿#region Using Directives

using System;

using Csla;

#endregion

namespace MarketPulse.BusinessLogic.Common.Criteria
{
    /// <summary>
    /// Criteria class specifying the criteria allowable for a search for a Enquiry object
    /// </summary>
    [Serializable]
    public class EnquiryCriteria : CriteriaBase<EnquiryCriteria>
    {
          #region Constructors

            /// <summary>
            /// Default constructor for this class
            /// </summary>
            /// <param name="enquiryGuid">The Guid of the Enquiry to associate with this criteria</param>                     
            public EnquiryCriteria(Guid enquiryGuid)
            {
                EnquiryGUID  = enquiryGuid;
            }

            /// <summary>
            /// Overloaded constructor for this class that accepts extra parameters 
            /// </summary>
            /// <param name="profileGUID">The Guid of the profile to associate with this criteria</param>
            /// <param name="companyGUID">The Guid of the Company to associate with this criteria</param>                              
            public EnquiryCriteria(Guid? profileGUID, Guid? companyGUID)
            {
                
                ProfileGUID  = profileGUID;
                CompanyGUID  = companyGUID;                                                                                
            }

        #endregion

        #region Properties

            /// <summary>
            /// This Guid is used to identify the Enquiry object associated with this criteria
            /// </summary>
            public static PropertyInfo<Guid?> EnquiryGUIDProperty = RegisterProperty<Guid?>(p => p.EnquiryGUID);
            /// <summary>
            /// This Guid is used to identify the Enquiry object associated with this criteria
            /// </summary>
            public Guid? EnquiryGUID
            {
                get { return ReadProperty(EnquiryGUIDProperty); }
                private set { LoadProperty(EnquiryGUIDProperty, value); }
            }

            /// <summary>
            /// This Guid is used to identify the Profile object associated with this criteria
            /// </summary>
            public static PropertyInfo<Guid?> ProfileGUIDProperty = RegisterProperty<Guid?>(p => p.ProfileGUID);
            /// <summary>
            /// This Guid is used to identify the Profile object associated with this criteria
            /// </summary>
            public Guid? ProfileGUID
            {
                get { return ReadProperty(ProfileGUIDProperty); }
                private set { LoadProperty(ProfileGUIDProperty, value); }
            }

            /// <summary>
            /// This Guid is used to identify the Company object associated with this criteria
            /// </summary>
            public static PropertyInfo<Guid?> CompanyGUIDProperty = RegisterProperty<Guid?>(p => p.CompanyGUID);
            /// <summary>
            /// This Guid is used to identify the Company object associated with this criteria
            /// </summary>
            public Guid? CompanyGUID
            {
                get { return ReadProperty(CompanyGUIDProperty); }
                private set { LoadProperty(CompanyGUIDProperty, value); }
            }

        #endregion
    }
}
